Skip to content

Conversation

@mboersma
Copy link
Contributor

@mboersma mboersma commented Mar 31, 2025

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Updates CAPI to v1.10.0-rc.0.

Which issue(s) this PR fixes:

Fixes #5491

Special notes for your reviewer:

See controller-runtime v0.20 release notes: https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.20.0
See CAPI 1.9 - 1.10 migration guide: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/book/src/developer/providers/migrations/v1.9-to-v1.10.md

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

Bump CAPI to v1.10.0-rc.0

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Mar 31, 2025
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 31, 2025
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 31, 2025
@codecov
Copy link

codecov bot commented Mar 31, 2025

Codecov Report

Attention: Patch coverage is 23.33333% with 23 lines in your changes missing coverage. Please review.

Project coverage is 52.84%. Comparing base (5ec5ca9) to head (97d700d).
Report is 41 commits behind head on main.

Files with missing lines Patch % Lines
api/v1beta1/azureclustertemplate_webhook.go 14.28% 6 Missing ⚠️
api/v1beta1/azurecluster_webhook.go 28.57% 5 Missing ⚠️
api/v1beta1/azuremanagedclustertemplate_webhook.go 0.00% 4 Missing ⚠️
exp/api/v1beta1/azuremachinepoolmachine_webhook.go 0.00% 4 Missing ⚠️
api/v1beta1/azureclusteridentity_webhook.go 50.00% 2 Missing ⚠️
api/v1beta1/azuremanagedcluster_webhook.go 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5533      +/-   ##
==========================================
- Coverage   52.86%   52.84%   -0.02%     
==========================================
  Files         272      272              
  Lines       29474    29484      +10     
==========================================
  Hits        15582    15582              
- Misses      13080    13090      +10     
  Partials      812      812              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mboersma
Copy link
Contributor Author

mboersma commented Apr 1, 2025

This is hitting the same error as #5530.

@nawazkh
Copy link
Member

nawazkh commented Apr 10, 2025

/assign @nawazkh

@nawazkh
Copy link
Member

nawazkh commented Apr 10, 2025

admission webhook "validation.azurecluster.infrastructure.cluster.x-k8s.io" denied the request: AzureCluster.infrastructure.cluster.x-k8s.io "" is invalid: [metadata.name: Invalid value: "": Cluster Name doesn't match regex ^[a-z0-9][a-z0-9-]{0,42}[a-z0-9]$, can contain only lowercase alphanumeric characters and '-', must start/end with an alphanumeric character, spec.identityRef: Required value: identityRef is required], admission webhook "validation.azureclusteridentity.infrastructure.cluster.x-k8s.io" denied the request: AzureClusterIdentity.infrastructure.cluster.x-k8s.io "" is invalid: Spec.Type: Invalid value: "": field is immutable, unable to set an empty value if it was already set

The AzureCluster is getting it's name set to "" ? Thats strange.

@nawazkh
Copy link
Member

nawazkh commented Apr 10, 2025

For example from one of the tests that is failing

Workload cluster creation when Creating a highly available cluster with Azure CNI v1 [REQUIRED] [It] can create 3 control-plane nodes and 2 Linux worker nodes [Azure CNI v1]
/home/prow/go/src/sigs.k8s.io/cluster-api-provider-azure/test/e2e/azure_test.go:298
   Captured StdOut/StdErr Output >>
  2025/04/07 19:42:31 failed trying to get namespace (capz-e2e-ovwnsn):namespaces "capz-e2e-ovwnsn" not found
  << Captured StdOut/StdErr Output
   Timeline >>
  INFO: "can create 3 control-plane nodes and 2 Linux worker nodes" started at Mon, 07 Apr 2025 19:42:31 UTC on Ginkgo node 6 of 10 and junit test report to file /logs/artifacts/test_e2e_junit.e2e_suite.1.xml
  STEP: Creating namespace "capz-e2e-ovwnsn" for hosting the cluster @ 04/07/25 19:42:31.291
  Apr  7 19:42:31.291: INFO: starting to create namespace for hosting the "capz-e2e-ovwnsn" test spec
  INFO: Creating namespace capz-e2e-ovwnsn
  INFO: Creating event watcher for namespace "capz-e2e-ovwnsn"
  INFO: Cluster name is capz-e2e-ovwnsn-azcni-v1
  INFO: Creating the workload cluster with name "capz-e2e-ovwnsn-azcni-v1" using the "azure-cni-v1" template (Kubernetes v1.29.12, 3 control-plane machines, 2 worker machines)
  INFO: Getting the cluster template yaml
  INFO: clusterctl config cluster capz-e2e-ovwnsn-azcni-v1 --infrastructure (default) --kubernetes-version v1.29.12 --control-plane-machine-count 3 --worker-machine-count 2 --flavor azure-cni-v1
  INFO: Creating the workload cluster with name "capz-e2e-ovwnsn-azcni-v1" from the provided yaml
  INFO: Applying the cluster template yaml of cluster capz-e2e-ovwnsn/capz-e2e-ovwnsn-azcni-v1
  [FAILED] in [It] - /home/prow/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/clusterctl/clusterctl_helpers.go:431 @ 04/07/25 19:43:31.816
  Apr  7 19:43:31.816: INFO: FAILED!
  Apr  7 19:43:31.816: INFO: Cleaning up after "Workload cluster creation when Creating a highly available cluster with Azure CNI v1 [REQUIRED] can create 3 control-plane nodes and 2 Linux worker nodes" spec
  Apr  7 19:43:31.816: INFO: Dumping all the Cluster API resources in the "capz-e2e-ovwnsn" namespace
  STEP: Redacting sensitive information from logs @ 04/07/25 19:43:31.818
  [FAILED] in [AfterEach] - /home/prow/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/alltypes_helpers.go:132 @ 04/07/25 19:43:33.65

We do generate the cluster name. (INFO: Cluster name is capz-e2e-ovwnsn-azcni-v1). But seems like it is not getting set in the template.

@mboersma mboersma changed the title [WIP] Bump CAPI to v1.10.0-beta.1 [WIP] Bump CAPI to v1.10.0-rc.0 Apr 10, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from nawazkh. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mboersma mboersma mentioned this pull request Apr 10, 2025
4 tasks
@nawazkh
Copy link
Member

nawazkh commented Apr 11, 2025

I was able to replicate the With 3 control-plane nodes and 2 Linux and 2 Windows worker nodes test locally, and running into the same issue. Probing..

Comment on lines 36 to 37
WithDefaulter(&AzureCluster{}).
WithValidator(&AzureCluster{}).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still probing, but could setting this as empty structs be the issue ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a try--I copied the empty struct pattern from CAPI without thinking about it much, but let's try using the calling structs instead.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some progress on the tests with the commit e3c1ffd
My changes were inspired from https://github.com/kubernetes-sigs/cluster-api-provider-gcp/pull/1459/files

github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0
github.com/Azure/azure-sdk-for-go/sdk/tracing/azotel v0.4.0
github.com/Azure/azure-service-operator/v2 v2.11.0
github.com/Azure/azure-service-operator/v2 v2.12.1-0.20250331045328-e711390fd009
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I dont fully understand this.
Is this commit e711390fd009 referring to the v2/go.mod in ASO with sigs.k8s.io/controller-runtime updated to v0.20.4 ?
If so, could you please mention how we got this commit tag ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is referring to a commit after v2.12. It was pulled in by go get -u and things compiled, so I've left it intact, but I assume we want to replace it with v2.13 when that is released.

@nawazkh nawazkh mentioned this pull request Apr 11, 2025
4 tasks
@mboersma
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-ci-entrypoint

@k8s-ci-robot
Copy link
Contributor

@mboersma: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-azure-conformance-with-ci-artifacts-dra 97d700d link false /test pull-cluster-api-provider-azure-conformance-with-ci-artifacts-dra
pull-cluster-api-provider-azure-conformance 97d700d link false /test pull-cluster-api-provider-azure-conformance
pull-cluster-api-provider-azure-conformance-with-ci-artifacts 97d700d link false /test pull-cluster-api-provider-azure-conformance-with-ci-artifacts
pull-cluster-api-provider-azure-conformance-dual-stack-with-ci-artifacts 97d700d link false /test pull-cluster-api-provider-azure-conformance-dual-stack-with-ci-artifacts
pull-cluster-api-provider-azure-e2e 97d700d link true /test pull-cluster-api-provider-azure-e2e
pull-cluster-api-provider-azure-apidiff 97d700d link false /test pull-cluster-api-provider-azure-apidiff
pull-cluster-api-provider-azure-capi-e2e 97d700d link false /test pull-cluster-api-provider-azure-capi-e2e
pull-cluster-api-provider-azure-conformance-ipv6-with-ci-artifacts 97d700d link false /test pull-cluster-api-provider-azure-conformance-ipv6-with-ci-artifacts
pull-cluster-api-provider-azure-e2e-workload-upgrade 97d700d link false /test pull-cluster-api-provider-azure-e2e-workload-upgrade
pull-cluster-api-provider-azure-apiversion-upgrade 97d700d link true /test pull-cluster-api-provider-azure-apiversion-upgrade
pull-cluster-api-provider-azure-conformance-custom-builds 97d700d link false /test pull-cluster-api-provider-azure-conformance-custom-builds
pull-cluster-api-provider-azure-e2e-aks 97d700d link true /test pull-cluster-api-provider-azure-e2e-aks
pull-cluster-api-provider-azure-ci-entrypoint 97d700d link true /test pull-cluster-api-provider-azure-ci-entrypoint

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@tamalsaha tamalsaha mentioned this pull request Apr 14, 2025
4 tasks
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 15, 2025
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@mboersma
Copy link
Contributor Author

/close

See #5517

@k8s-ci-robot
Copy link
Contributor

@mboersma: Closed this PR.

In response to this:

/close

See #5517

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@github-project-automation github-project-automation bot moved this from Todo to Done in CAPZ Planning Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

CAPI v1.10.0-beta.0 has been released and is ready for testing

3 participants